function varOU(time,y,a,m,b,yic,Y)

if a==0
exactvar=time';
else
exactvar=b^2/2/a*(1-exp(-2*a*time))'+(m+(yic-m)*exp(-a*time)).^2';    
end
hold on
plot(time,exactvar);
tmp=zeros(size(y(:,1)));
for ii=1:size(Y,2)
    %tmp=tmp+Y(:,ii).*Y(:,ii);
    tmp=tmp+Y(:,ii);
end
plot(time,tmp,'r-');
title('Variance')
legend('exact var','wce var');
